home *** CD-ROM | disk | FTP | other *** search
- /* smake.ged V1.01 inspired by dmake.ged of Dietmar Eilert
- written in 1994 by Roland Schwingel
- Lilienthalstraße 9
- 92421 Schwandorf
- Germany
-
- Description:
- Calls smake utility (SAS/C).
- When there is a makefile in the current drawer then 'smake'
- is invoked else the current file is compiled using 'sc'.
- */
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT QUIET' /* lock GUI, gain access */
- OPTIONS FAILAT 6 /* ignore warnings */
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- /* ------------------------- INSERT YOUR CODE HERE: -------------------- */
-
- arg scopts
-
- 'QUERY CAT'
- isGerman = (result = "deutsch")
-
- 'QUERY MODIFY'
-
- if (result = 'TRUE') then do
-
- if (isGerman) then
- 'REQUEST BODY="Datei wurde verändert. Speichern ?" BUTTON="Speichern|Nicht speichern"'
- else
- 'REQUEST BODY="File has been changed. Save it ?" BUTTON="Save|Do not save"'
-
- if (result = 1) then
- 'SAVE ALL'
- end
-
- 'QUERY PATH VAR PATH'
-
- if ((right(path, 1) ~= ':') & (right(path,1) ~= '/')) then
- path = path || '/'
-
- if (exists(path || 'makefile')) then
- do
- shell
- pragma('D', path)
- 'smake' scopts
- end
- else
- do
- 'QUERY DOC VAR WINNAME'
- shell
- pragma('D',path)
- 'sc' winname
- end
-
- shell
- if (isGerman) then
- say "Fertig. (RETURN drücken)."
- else
- say "Done. (press RETURN)."
-
- pull dummy
-
-
- /* ---------------------------- END OF YOUR CODE ----------------------- */
-
- 'UNLOCK' /* VERY important: unlock GUI */
- EXIT
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
- 'UNLOCK'
- EXIT
-
-